package cn.etg.product2503.exception;
import org.springframework.web.bind.annotation.ExceptionHandler;

import cn.etg.product2503.common.Result;

public class GlobalException {
    @ExceptionHandler(CustomException.class)
    public Result<String> handleCustomException(CustomException e) {
        return Result.error(e.getCode(),e.getMessage());
    }
}
